<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Mosaddek">
    <meta name="keyword" content="FlatLab, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
    <link rel="shortcut icon" href="img/favicon.png">

    <title>南牧物联网云平台</title>

    <!-- Bootstrap core CSS -->
    <link href="__PUBLIC__/css/bootstrap.css" rel="stylesheet">
    <link href="__PUBLIC__/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="__PUBLIC__/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
	<link href="__PUBLIC__/assets/morris.js-0.4.3/morris.css" rel="stylesheet" />
    <link href="__PUBLIC__/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.css" rel="stylesheet" type="text/css" media="screen"/>
    <link rel="stylesheet" href="__PUBLIC__/css/owl.carousel.css" type="text/css">

      <!--right slidebar-->
      <link href="__PUBLIC__/css/slidebars.css" rel="stylesheet">

    <!-- Custom styles for this template -->

    <link href="__PUBLIC__/css/style.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style-responsive.css" rel="stylesheet" />

  </head>

  <body>

			  <div class="main_nav_bottom">
                <nav class="navbar navbar-inverse navbar-fixed-top">
                    <div class="container" align="center">
                        <ul class="nav nav-tabs nav-tabs-justified">
                           
                                <button onclick="readclock();" type="button" class="btn btn-primary">读取时间</button>
								<button onclick="writeclock();" type="button" class="btn btn-success">设置时间</button>
								<button onclick="readpara();" type="button" class="btn btn-primary">读取参数</button>
								<button onclick="writepara();" type="button" class="btn btn-success">设置参数</button>
								<button onclick="savenm3000();" type="button" class="btn btn-success">保存</button>
                            
                        </ul>
                    </div>
                </nav>
              </div>
			<div class="mybar">
			  <div class="row">
                  <div class="col-lg-12">
                      <!--breadcrumbs start -->
                      <ul class="breadcrumb">
                          <li><a href="#" onclick="parent.document.getElementById('id-a-Index').click();parent.document.getElementById('id-a-Index-home').click();"><i class="fa fa-dashboard"></i> 养殖场</a></li>
                          <li><a href="#" onclick="parent.document.getElementById('id-a-Setting-home').click();"></i>设备管理</a></li>
                          <li class="active">料线控制器管理</li>
                      </ul>
                      <!--breadcrumbs end -->
                  </div>
              </div>
			  
		      <div class="row">
				
					<form  id="id-form-system">
					  <section class="panel">
							  <header class="panel-heading">
								  档案参数
							  </header>
							  <div class="panel-body">
									<div class="row">
										  <div  style="display:none">
											  <label for="input2" class="col-lg-1 col-md-1 control-label">ID</label>
											  <div class="col-lg-2 col-md-2">
												  <input type="text" class="form-control" name="rid" placeholder="" value="{$model['rid']}">
												  <p class="help-block"></p>
											  </div>
											  <div class="col-lg-1 col-md-1"></div>
										  </div>
										  
										  <div >
											  <label for="input2" class="col-lg-1 col-md-1 control-label">名称</label>
											  <div class="col-lg-2 col-md-2">
												  <input type="text" class="form-control" name="lxname" placeholder="" value="{$model['lxname']}">
												  <p class="help-block"></p>
											  </div>
											  <div class="col-lg-1 col-md-1"></div>
										  </div>
										  
										  <div >
											  <label for="input2" class="col-lg-1 col-md-1 control-label">设备地址</label>
											  <div class="col-lg-2 col-md-2">
												  <input type="text" class="form-control" name="lxcode" placeholder="" value="{$model['lxcode']}">
												  <p class="help-block"></p>
											  </div>
											  <div class="col-lg-1 col-md-1"></div>
										  </div>
										  
										  <div >
											  <label for="input2" class="col-lg-1 col-md-1 control-label">服务器IP端口</label>
											  <div class="col-lg-2 col-md-2">
												  <input type="text" class="form-control" name="serveraddr" placeholder="" value="{$model['serveraddr']}">
												  <p class="help-block"></p>
											  </div>
											  <div class="col-lg-1 col-md-1"></div>
										  </div>
									</div>
									  
									<div class="row">
										  <div >
											  <label for="input2" class="col-lg-1 col-md-1 control-label">本地IP</label>
											  <div class="col-lg-2 col-md-2">
												  <input type="text" class="form-control" name="localip" placeholder="" value="{$model['localip']}">
												  <p class="help-block"></p>
											  </div>
											  <div class="col-lg-1 col-md-1"></div>
										  </div>
										  
										  <div >
											  <label for="input2" class="col-lg-1 col-md-1 control-label">网关</label>
											  <div class="col-lg-2 col-md-2">
												  <input type="text" class="form-control" name="localgateway" placeholder="" value="{$model['localgateway']}">
												  <p class="help-block"></p>
											  </div>
											  <div class="col-lg-1 col-md-1"></div>
										  </div>
										  
										  <div >
											  <label for="input2" class="col-lg-1 col-md-1 control-label">掩码</label>
											  <div class="col-lg-2 col-md-2">
												  <input type="text" class="form-control" name="localmask" placeholder="" value="{$model['localmask']}">
												  <p class="help-block"></p>
											  </div>
											  <div class="col-lg-1 col-md-1"></div>
										  </div>
									  </div>

									  <!-- <div class="form-group">
										  <div class="col-lg-8">
											  <button onclick="updateBasic();" type="button" class="btn btn-info">保存</button>
										  </div>
									  </div> -->
							  </div>
						</section>
                      <section class="panel">
						  <header class="panel-heading">
                              模式设置
                          </header>
                          <div class="panel-body">
								
								  <div class="form-group">
									  <label for="input2" class="col-lg-3 col-sm-3 control-label">送料模式设置</label>
									  <div class="col-sm-3 text-center">
										  <div class="switch" id='myswitch1' data-on-label="自动" data-off-label="手动">
											<input type="checkbox"  name='slmodel' data-toggle="switch" value=""/>
										  </div>
									  </div>
									  
									  <label for="input2" class="col-lg-3 col-sm-3 control-label">下料模式设置</label>
									  <div class="col-sm-3 text-center">
										  <div class="switch" id='myswitch2' data-on-label="自动" data-off-label="手动">
											<input type="checkbox"  name='xlmodel' data-toggle="switch" value="" />
										  </div>
									  </div>
								  </div>
								  <div class="form-group">
									  
								  </div>
                          </div>
                      </section>
					  <section class="panel">
						  <header class="panel-heading">
                              系统变量设置
                          </header>
                          <div class="panel-body">
						  
							  <div class="form-group">
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">下料次数</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='xlcount' placeholder="" value="{$model['xlcount']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">绞龙启动延时</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='jl_delay' placeholder="" value="{$model['jl_delay']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">忽略满料开关时间</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='hllmkg' placeholder="" value="{$model['hllmkg']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">自动清洁定量杯</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='autoclearn' placeholder="" value="{$model['autoclearn']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">是否需要密码</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='needpwd' placeholder="" value="{$model['needpwd']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">下料器打开时间</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='xlopentime' placeholder="" value="{$model['xlopentime']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">下料器关闭时间</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='xlclosetime' placeholder="" value="{$model['xlclosetime']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">下料器保持时间</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='xlkeeptime' placeholder="" value="{$model['xlkeeptime']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">塞链停止延时</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='slstopdelay' placeholder="" value="{$model['slstopdelay']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">塞链最大运行时间</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='slmaxtime' placeholder="" value="{$model['slmaxtime']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">塞链最大电流</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='slmaxdl' placeholder="" value="{$model['slmaxdl']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">塞链电流差</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='sldlc' placeholder="" value="{$model['sldlc']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">塞链最大电流时间</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='slmaxdltime' placeholder="" value="{$model['slmaxdltime']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">塞链极限电流</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='sllimitdl' placeholder="" value="{$model['sllimitdl']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">塞链极限电流时间</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='sllimitdltime' placeholder="" value="{$model['sllimitdltime']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">塞链空载电流</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='slkzdl' placeholder="" value="{$model['slkzdl']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">塞链空载电流时间</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='slkzdltime' placeholder="" value="{$model['slkzdltime']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">满料开关检测时间</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name='mlkgcheck' placeholder="" value="{$model['mlkgcheck']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  <!-- <div class="row">
                                      <div class="col-lg-8">
                                          <button onclick="updateSytem();" type="button" class="btn btn-info">保存</button>
                                      </div>
                                  </div> -->
							  </div>
							  
							  
                          </div>
                      </section> 
					  <section class="panel">
						  <header class="panel-heading">
                              送料时间表
                          </header>
                          <div class="panel-body">
						  
							  <div class="form-group">
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">1</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl1" placeholder="" value="{$slmodel['sltime1']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">2</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl2" placeholder="" value="{$slmodel['sltime2']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">3</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl3" placeholder="" value="{$slmodel['sltime3']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">4</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl4" placeholder="" value="{$slmodel['sltime4']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">5</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl5" placeholder="" value="{$slmodel['sltime5']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">6</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl6" placeholder="" value="{$slmodel['sltime6']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">7</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl7" placeholder="" value="{$slmodel['sltime7']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">8</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl8" placeholder="" value="{$slmodel['sltime8']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">9</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl9" placeholder="" value="{$slmodel['sltime9']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">10</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl10" placeholder="" value="{$slmodel['sltime10']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">11</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl11" placeholder="" value="{$slmodel['sltime11']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">12</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl12" placeholder="" value="{$slmodel['sltime12']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">13</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl13" placeholder="" value="{$slmodel['sltime13']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">14</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl14" placeholder="" value="{$slmodel['sltime14']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">15</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl15" placeholder="" value="{$slmodel['sltime15']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">16</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl16" placeholder="" value="{$slmodel['sltime16']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">17</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl17" placeholder="" value="{$slmodel['sltime17']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">18</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl18" placeholder="" value="{$slmodel['sltime18']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">19</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl19" placeholder="" value="{$slmodel['sltime19']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">20</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="sl20" placeholder="" value="{$slmodel['sltime20']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>

								  </div>
								  
								  <!-- <div class="row">
                                      <div class="col-lg-8">
                                          <button onclick="updateSltime();" type="button" class="btn btn-info">保存</button>
                                      </div>
                                  </div> -->
								  
							  </div>
							  
							  
                          </div>
                      </section>
					  <section class="panel">
						  <header class="panel-heading">
                              下料时间表
                          </header>
                          <div class="panel-body">
						  
							  <div class="form-group">
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">1</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl1" placeholder="" value="{$xlmodel['xltime1']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">2</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl2" placeholder="" value="{$xlmodel['xltime2']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">3</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl3" placeholder="" value="{$xlmodel['xltime3']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">4</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl4" placeholder="" value="{$xlmodel['xltime4']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">5</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl5" placeholder="" value="{$xlmodel['xltime5']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">6</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl6" placeholder="" value="{$xlmodel['xltime6']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">7</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl7" placeholder="" value="{$xlmodel['xltime7']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">8</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl8" placeholder="" value="{$xlmodel['xltime8']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">9</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl9" placeholder="" value="{$xlmodel['xltime9']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">10</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl10" placeholder="" value="{$xlmodel['xltime10']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">11</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl11" placeholder="" value="{$xlmodel['xltime11']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">12</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl12" placeholder="" value="{$xlmodel['xltime12']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">13</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl13" placeholder="" value="{$xlmodel['xltime13']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">14</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl14" placeholder="" value="{$xlmodel['xltime14']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">15</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl15" placeholder="" value="{$xlmodel['xltime15']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">16</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl16" placeholder="" value="{$xlmodel['xltime16']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">17</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl17" placeholder="" value="{$xlmodel['xltime17']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">18</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl18" placeholder="" value="{$xlmodel['xltime18']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  </div>
								  
								  <div class="row">
								  <label for="input2" class="col-lg-1 col-md-1 control-label">19</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl19" placeholder="" value="{$xlmodel['xltime19']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>
								  
								  <label for="input2" class="col-lg-1 col-md-1 control-label">20</label>
								  <div class="col-lg-2 col-md-2">
									  <input type="text" class="form-control" name="xl20" placeholder="" value="{$xlmodel['xltime20']}">
									  <p class="help-block"></p>
								  </div>
								  <div class="col-lg-1 col-md-1"></div>

								  </div>
								  
								  <!-- <div class="row">
                                      <div class="col-lg-8">
                                          <button onclick="updateXltime();" type="button" class="btn btn-info">保存</button>
                                      </div>
                                  </div> -->

								  
							  </div>
							  
							  
                          </div>
                      </section>
					</form>
                
			  </div>
			</div>

    <!-- js placed at the end of the document so the pages load faster -->
    <script src="__PUBLIC__/js/jquery.js"></script>
    <script src="__PUBLIC__/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="__PUBLIC__/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="__PUBLIC__/js/jquery.scrollTo.min.js"></script>
    <script src="__PUBLIC__/js/jquery.nicescroll.js" type="text/javascript"></script>
	<!-- SlimScroll -->
	<script src="__PUBLIC__/plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <script src="__PUBLIC__/js/jquery.sparkline.js" type="text/javascript"></script>
    <script src="__PUBLIC__/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.js"></script>
    <script src="__PUBLIC__/js/owl.carousel.js" ></script>
    <script src="__PUBLIC__/js/jquery.customSelect.min.js" ></script>
	<script src="__PUBLIC__/assets/morris.js-0.4.3/morris.min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/assets/morris.js-0.4.3/raphael-min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/js/respond.min.js" ></script>

    <!--right slidebar-->
    <script src="__PUBLIC__/js/slidebars.min.js"></script>

    <!--common script for all pages-->
    <script src="__PUBLIC__/js/common-scripts.js"></script>

	<!--this page plugins-->
	<script type="text/javascript" src="__PUBLIC__/assets/fuelux/js/spinner.min.js"></script>
	
	<!--custom switch-->
	<script src="__PUBLIC__/js/bootstrap-switch.js"></script>
	<!--custom tagsinput-->
	<script src="__PUBLIC__/js/jquery.tagsinput.js"></script>
	<!--custom checkbox & radio-->
	<script type="text/javascript" src="__PUBLIC__/js/ga.js"></script>
	
	<!-- layer -->
	<script src="__PUBLIC__/plugins/layer-v3.0.1/layer/layer.js"></script>

  <script>
	  function initScroll(){
		var h=$(window).height();
		//出现滚动条
		$(".mybar").slimScroll({
			height:(h-10),
			size: '10px', //组件宽度
			color: '#000', //滚动条颜色
			position: 'right', //组件位置：left/right
			distance: '0px', //组件与侧边之间的距离
			start: 'top', //默认滚动位置：top/bottom
			opacity: .9, //滚动条透明度
			alwaysVisible: true, //是否 始终显示组件
			disableFadeOut: false, //是否 鼠标经过可滚动区域时显示组件，离开时隐藏组件
			railVisible: true, //是否 显示轨道
			railColor: '#333', //轨道颜色
			railOpacity: .2, //轨道透明度
			railDraggable: true, //是否 滚动条可拖动
			railClass: 'slimScrollRail', //轨道div类名 
			barClass: 'slimScrollBar', //滚动条div类名
			wrapperClass: 'slimScrollDiv', //外包div类名
			allowPageScroll: true, //是否 使用滚轮到达顶端/底端时，滚动窗口
			wheelStep: 20, //滚轮滚动量
			touchScrollStep: 200, //滚动量当用户使用手势
			borderRadius: '7px', //滚动条圆角
			railBorderRadius: '7px' //轨道圆角
		});
	  }
	  $(window).resize(function(){
		initScroll();
	  });
      $(document).ready(function() {
			initScroll();
			var slState=({$model['slmodel']}>0?true:false);
			var xlState=({$model['xlmodel']}>0?true:false);
			//console.info(slState,xlState);
			
			$('#myswitch1').bootstrapSwitch('setState', slState);
			$('#myswitch2').bootstrapSwitch('setState', xlState);
			
			// Switch
			//$("[data-toggle='switch']").wrap('<div class="switch" />').parent().bootstrapSwitch();
			$('#myswitch1').on('switch-change', function (e, data) {
				var $el = $(data.el)
				  , value = data.value;
				console.log(value);
				setSlModel(value);
			});
			
			$('#myswitch2').on('switch-change', function (e, data) {
				var $el = $(data.el)
				  , value = data.value;
				console.log(value);
				setxlModel(value);
			});
			
			
      });


	  function setSlModel(value){
		mode=(value?"1":"0");
		//console.log(mode);
		layer.load();
		$.ajax({
			  type: 'get',
			  url:"{:u('Setting/setSlModel')}"+"?rid={$model['rid']}&lxcode="+$("input[name='lxcode']").val()+"&value="+mode+"",
			  data: {},
			  success: function(msg){
				layer.closeAll('loading');
				if(msg){
					if(msg.message=="OK"){
						//
						//$('#switch1').bootstrapSwitch('setState', value);
						layer.open({
						  title: '成功'
						  ,content: '应用保存成功'
						});
					}else{
						layer.open({
						  title: ''
						  ,content: msg.message
						}); 
						//$('#switch1').bootstrapSwitch('setState', !value);
						location.reload();
					}
				}else{
					location.reload();
				}
			  },
			  error: function(XMLHttpRequest, textStatus, errorThrown) {
				    layer.closeAll('loading');
				    //alert('提交失败'+XMLHttpRequest.status);
					layer.open({
					  title: '错误'
					  ,content: XMLHttpRequest.status
					});
			  },
			  dataType: "json"
		});
	  }
	  
	  function setxlModel(value){
		mode=(value?"1":"0");
		//console.log(mode);
		layer.load();
		$.ajax({
			  type: 'get',
			  url:"{:u('Setting/setxlModel')}"+"?rid={$model['rid']}&lxcode="+$("input[name='lxcode']").val()+"&value="+mode+"",
			  data: {},
			  success: function(msg){
				layer.closeAll('loading');
				if(msg){
					if(msg.message=="OK"){
						//
						//$('#switch1').bootstrapSwitch('setState', value);
						layer.open({
						  title: '成功'
						  ,content: '应用保存成功'
						});
					}else{
						layer.open({
						  title: ''
						  ,content: msg.message
						}); 
						//$('#switch1').bootstrapSwitch('setState', !value);
						location.reload();
					}
				}else{
					location.reload();
				}
			  },
			  error: function(XMLHttpRequest, textStatus, errorThrown) {
				    layer.closeAll('loading');
				    //alert('提交失败'+XMLHttpRequest.status);
					layer.open({
					  title: '错误'
					  ,content: XMLHttpRequest.status
					});
			  },
			  dataType: "json"
		});
	  }
	  
	  function readclock(){
		layer.load();
		$.ajax({
			  type: 'get',
			  url:"{:u('Setting/readclock')}"+"?rid={$model['rid']}&lxcode="+$("input[name='lxcode']").val(),
			  data: {},
			  success: function(msg){
				console.info(msg);
				layer.closeAll('loading');
				if(msg){
					layer.open({
					  title: ''
					  ,content: msg.message
					}); 
				}else{
					
				}
			  },
			  error: function(XMLHttpRequest, textStatus, errorThrown) {
				    layer.closeAll('loading');
				    console.info(XMLHttpRequest);
					layer.open({
					  title: '错误'
					  ,content: XMLHttpRequest.status
					});
			  },
			  dataType: "json"
		});
	  }
	  
	  function writeclock(){
		layer.load();
		$.ajax({
			  type: 'get',
			  url:"{:u('Setting/writeclock')}"+"?rid={$model['rid']}&lxcode="+$("input[name='lxcode']").val(),
			  data: {},
			  success: function(msg){
				layer.closeAll('loading');
				if(msg){
					if(msg.message=="OK"){
						layer.open({
						  title: '设置成功'
						  ,content: '设置成功'
						}); 
					}else{
						layer.open({
						  title: ''
						  ,content: msg.message
						}); 
					}
				}
			  },
			  error: function(XMLHttpRequest, textStatus, errorThrown) {
				    layer.closeAll('loading');
				    //alert('提交失败'+XMLHttpRequest.status);
					layer.open({
					  title: '错误'
					  ,content: XMLHttpRequest.status
					});
			  },
			  dataType: "json"
		});
	  }
	  
	  
	  
	  
	  function savenm3000(){
		layer.load();
		$.ajax({
			  type: 'POST',
			  url:"{:u('Setting/savenm3000')}"+"?rid={$model['rid']}&lxcode="+$("input[name='lxcode']").val(),
			  data: $("#id-form-system").serialize(),
			  success: function(msg){
				if(msg>=0){
					layer.open({
						title: '保存成功'
						, content: '保存成功'
					});
				}else{
					layer.open({
						title: '保存失败'
						, content: '保存失败'
					});
				}
			  },
			  complete: function(XMLHttpRequest, textStatus) { 
				layer.closeAll('loading');
			  },
			  dataType: "text"
		});
	  }
	  
	  function updateBasic(){
		layer.load();
		$.ajax({
			  type: 'POST',
			  url:"{:u('Setting/updateBasic')}",
			  data: $("#id-form-system").serialize(),
			  success: function(msg){
				if(msg>=0){
					layer.open({
						title: '修改成功'
						, content: '修改成功'
					});
				}else{
					layer.open({
						title: '修改失败'
						, content: '修改失败'
					});
				}
			  },
			  complete: function(XMLHttpRequest, textStatus) { 
				layer.closeAll('loading');
			  },
			  dataType: "text"
		});
	  }
	  
	  function updateSytem(){
		layer.load();
		$.ajax({
			  type: 'POST',
			  url:"{:u('Setting/updateSytem')}"+"?rid={$model['rid']}&lxcode="+$("input[name='lxcode']").val(),
			  data: $("#id-form-system").serialize(),
			  success: function(msg){
				if(msg>=0){
					layer.open({
						title: '修改成功'
						, content: '修改成功'
					});
				}else{
					layer.open({
						title: '修改失败'
						, content: '修改失败'
					});
				}
			  },
			  complete: function(XMLHttpRequest, textStatus) { 
				layer.closeAll('loading');
			  },
			  dataType: "text"
		});
	  }
	  
	  
	  function updateSltime(){
		layer.load();
		$.ajax({
			  type: 'POST',
			  url:"{:u('Setting/updateSltime')}"+"?lxcode={$slmodel['lxcode']}",
			  data: $("#id-form-system").serialize(),
			  success: function(msg){
				if(msg>=0){
					layer.open({
						title: '修改成功'
						, content: '修改成功'
					});
				}else{
					layer.open({
						title: '修改失败'
						, content: '修改失败'
					});
				}
			  },
			  complete: function(XMLHttpRequest, textStatus) { 
				layer.closeAll('loading');
			  },
			  dataType: "text"
		});
	  }
	  
	  
	  function updateXltime(){
		layer.load();
		$.ajax({
			  type: 'POST',
			  url:"{:u('Setting/updateXltime')}"+"?lxcode={$xlmodel['lxcode']}",
			  data: $("#id-form-system").serialize(),
			  success: function(msg){
				if(msg>=0){
					layer.open({
						title: '修改成功'
						, content: '修改成功'
					});
				}else{
					layer.open({
						title: '修改失败'
						, content: '修改失败'
					});
				}
			  },
			  complete: function(XMLHttpRequest, textStatus) { 
				layer.closeAll('loading');
			  },
			  dataType: "text"
		});
	  }
	  
	  
	  function readpara(){
		layer.load();
		$.ajax({
			  type: 'POST',
			  url:"{:u('Setting/readpara')}"+"?rid={$model['rid']}&lxcode="+$("input[name='lxcode']").val(),
			  data: $("#id-form-system").serialize(),
			  success: function(msg){
				layer.closeAll('loading');
				console.info(msg);
				if(msg){
					
					$("input[name='xlcount']").val(msg.xlcount);
					$("input[name='jl_delay']").val(msg.jl_delay);
					$("input[name='hllmkg']").val(msg.hllmkg);
					$("input[name='autoclearn']").val(msg.autoclearn);
					$("input[name='needpwd']").val(msg.needpwd);
					$("input[name='xlopentime']").val(msg.xlopentime);
					$("input[name='xlclosetime']").val(msg.xlclosetime);
					$("input[name='xlkeeptime']").val(msg.xlkeeptime);
					$("input[name='slstopdelay']").val(msg.slstopdelay);
					$("input[name='slmaxtime']").val(msg.slmaxtime);
					$("input[name='slmaxdl']").val(msg.slmaxdl);
					$("input[name='sldlc']").val(msg.sldlc);
					$("input[name='slmaxdltime']").val(msg.slmaxdltime);
					$("input[name='sllimitdl']").val(msg.sllimitdl);
					$("input[name='sllimitdltime']").val(msg.sllimitdltime);
					$("input[name='slkzdl']").val(msg.slkzdl);
					$("input[name='slkzdltime']").val(msg.slkzdltime);
					$("input[name='mlkgcheck']").val(msg.mlkgcheck);
					var sltab=msg.sltab;
					for(var i=0;i<sltab.length;i++){
						console.info(sltab[i]);
						$("input[name='sl"+(i+1)+"']").val(sltab[i]);
					}
					var xltab=msg.xltab;
					for(var i=0;i<xltab.length;i++){
						$("input[name='xl"+(i+1)+"']").val(xltab[i]);
					}
					layer.open({
						title: '读取成功'
						, content: '读取成功'
					});
				}
			  },
			  error: function(XMLHttpRequest, textStatus, errorThrown) {
					//alert(XMLHttpRequest.status);
					//alert(XMLHttpRequest.readyState);
					//alert(textStatus);
					console.info(XMLHttpRequest);
					console.info(textStatus);
					console.info(errorThrown);
					if(textStatus.toLowerCase()=='parsererror'){
						layer.open({
							title: '错误'
							, content: XMLHttpRequest.responseText
						});
					}
			  },
			  complete: function(XMLHttpRequest, textStatus) { 
				layer.closeAll('loading');
			  },
			  dataType: "json"
		});
	  }
	  
	  function writepara(){
		layer.load();
		$.ajax({
			  type: 'POST',
			  url:"{:u('Setting/writepara')}"+"?rid={$model['rid']}&lxcode="+$("input[name='lxcode']").val(),
			  data: $("#id-form-system").serialize(),
			  success: function(msg){
				layer.closeAll('loading');
				if(msg){
					if(msg.message=="OK"){
						layer.open({
							title: '成功'
							, content: '设置成功'
						});
					}else{
						layer.open({
						  title: ''
						  ,content: msg.message
						}); 
					}
				}
			  },
			  complete: function(XMLHttpRequest, textStatus) { 
				layer.closeAll('loading');
			  },
			  dataType: "json"
		});
	  }

  </script>

  </body>
</html>
